<div class="container-fluid padding-reset visible-xs home-mobile">
    <div class="carousel">
        <home-carousel :imgs-data="<%= home_mobile_imgs.to_json %>"></home-carousel>
    </div>

    <div class="category">
        <% spaces = Category.get_spaces %>
        <% spaces.each_with_index do |cate, index| %>
            <a href="/products?category_id=<%= cate.id %>" class="item <%= index < 3 ? 'bottom' : '' %>">
              <i class="<%= cate.try(:icon) %>"></i>
              <%= cate.title %>
            </a>
        <% end %>
        <% if spaces.size == 5 %>
            <a href="/products" class="item">
              <i class="icon-other-m"><i class="path1"></i><i class="path2"></i><i class="path3"></i><i class="path4"></i><i class="path5"></i><i class="path6"></i></i>其他
            </a>
        <% end %>
    </div>

    <hr>

    <div class="youhui">
        <a href="#" id="mobile-ads-home">
            <h1>
                <div class="pull-right">
                    <i class="icon-arrow-right"></i>
                </div>
                优惠专区
            </h1>
        </a>
    </div>

    <hr>
    <div class="yuyue">
        <home-reserve></home-reserve>
    </div>
    <hr>

    <div class="mobile-floor">
      <a href="<%= products_path %>" class="title">
          <h1>
              <div class="pull-right">
                  <i class="icon-arrow-right"></i>
              </div>
              畅销单品
          </h1>
      </a>
      <div class="row-three-column">
        <% @best_selling.each do |product| %>
          <a class="item" href="<%= product_path(product) %>">
            <%= product_default_img product %>
            <h1 class="product_name"><%= product.title %></h1>
          </a>
        <% end %>
      </div>
    </div>

    <hr>

    <% @floors.each_with_index do |floor, index| %>
      <div class="mobile-floor">
          <a class="title" href="<%= products_path(category_id: floor.category_id) %>">
              <h1>
                  <div class="pull-right">
                      <i class="icon-arrow-right"></i>
                  </div>
                  <%= floor.title %>
              </h1>
          </a>
          <div class="row-two-column">
            <% products = Product.unscoped.find floor.product_ids %>
            <% products.each do |product| %>
            <a class="item" href="<%= product_path(product) %>">
              <%= product_default_img product %>
              <h1 class="product_name"><%= product.title %></h1>
            </a>
            <% end %>
          </div>
      </div>
      <hr>
    <% end %>
</div>
